package com.hf.work04;

/**
 * 父类学生类
 * @author Lenovo-Healer
 */
public abstract class Student {
    /**
     * 学号
     */
    private int stuNo;
    /**
     * 姓名
     */
    private String stuName;
    /**
     * 性别
     */
    private String stuSex;
    /**
     * 年龄
     */
    private int stuAge;
    /**
     * 期末考试
     */
    private double stuFinal;
    /**
     * 期中考试
     */
    private double stuMiddle;

    public Student() {
    }
    //有参构造

    public Student(int stuNo, String stuName, String stuSex, int stuAge, double stuFinal, double stuMiddle) {
        this.stuNo = stuNo;
        this.stuName = stuName;
        this.stuSex = stuSex;
        this.stuAge = stuAge;
        this.stuFinal = stuFinal;
        this.stuMiddle = stuMiddle;
    }

    /**
     * 综合成绩
     */
    public abstract double sumScore();

    /**
     * 打印学生信息
     * @return 的
     */
    public void priStu(){
        System.out.println("学号:"+this.getStuNo()+"，姓名："+this.getStuName()+"，性别："+
                this.getStuSex()+"，年龄："+this.getStuAge()+"，综合成绩："+this.sumScore());

}


    //get/set方法

    public int getStuNo() {
        return stuNo;
    }

    public void setStuNo(int stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public double getStuFinal() {
        return stuFinal;
    }

    public void setStuFinal(double stuFinal) {
        this.stuFinal = stuFinal;
    }

    public double getStuMiddle() {
        return stuMiddle;
    }

    public void setStuMiddle(double stuMiddle) {
        this.stuMiddle = stuMiddle;
    }
}
